<template>
  <view @click="searchClickHandler()">
    <view class="my-search-container">
      <!-- 使用view组件模拟input输入框的效果 -->
      <view class="my-search-box">
        <uni-icons type="search" size="20"></uni-icons>
        <text class="placeholder">搜索</text>
      </view>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    methods:{
      searchClickHandler(){
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
  .my-search-container{
    height: 100rpx;
    display: flex;
    align-items: center;
    // background-image:linear-gradient(to bottom,#c00000,#d50000);
    background-color: #C00000;
    padding: 0 20rpx;
    .my-search-box{
      height: 75rpx;
      width: 100%;
      background-color: white;
      border-radius: 36rpx;
      display: flex;
      justify-content: center;
      align-items: center;
      .placeholder{
        margin-left: 10rpx;
      
      }
    }
  }
</style>